<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <p:panel header="Arvore de Especialidades">
            <h:form id="frmArvore">  
                <p:growl id="msgs" showDetail="true"/>  

                <p:panelGrid columns="3">
                    <p:column>
                        Digite parte do nome da Especialidade:
                    </p:column>
                    <p:column>
                        <p:inputText size="30" value="#{arvoreMB.nmeEspecialidade}"/>
                    </p:column>
                    <p:column>
                        <p:commandButton value="Filtrar" actionListener="#{arvoreMB.filtrar}" 
                                         update=":frmArvore:treEspecialidade" icon="ui-icon-search"/>
                    </p:column>
                </p:panelGrid>
                <p:panelGrid columns="1">
                    <p:tree id="treEspecialidade" value="#{arvoreMB.raiz}" var="no" style="width: 500px;">  
                        <p:treeNode type="especialidade" icon="ui-icon-contact">  
                            <h:outputText value="#{no}" />  
                        </p:treeNode>  

                        <p:treeNode type="tratador" icon="ui-icon-cart">  
                            <h:outputText value="#{no}" />  
                        </p:treeNode>
                    </p:tree> 
                </p:panelGrid>
            </h:form>
        </p:panel>
    </ui:define>

</ui:composition>
